import Ember from 'ember';
import config from 'game-front/config/environment';
import RSVP from 'rsvp';

export default Ember.Route.extend({
  actions:{
    home:function(){
      Ember.$(".shade").css({"display":"block"});
      Ember.$(".shade-gameshare").css({"display":"block"});
    },
    homeTo:function(){
      Ember.$(".shade").css({"display":"none"});
      Ember.$(".shade-gameshare").css({"display":"none"});
    }
  },
  model(params) {
    return RSVP.hash({
      userInfo: Ember.$.getJSON(config.apiBase + "members", {userId:params.key}),
      qrInfo:Ember.$.getJSON(config.apiBase + "share/qr", {userId:params.key})
    });
  }
});
